<!DOCTYPE html>
<html>
<head>
    <title>优惠券信息</title>
    <meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="Author" content="larry" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="../../statics/common/cascader/cascader/cascader.css" media="all">
<link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/layui.css" media="all">
<link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/autocomplete.css">
<link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/soulTable.css">
<link rel="stylesheet" type="text/css" href="../../statics/plugins/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" type="text/css" href="../../statics/css/common.css">
<link rel="stylesheet" type="text/css" href="../../statics/css/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="../../statics/css/list-search-table.css">
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layui-soul-table/docs/soulTable.css" media="all"/>-->
<script type="text/javascript" src="../../statics/plugins/jquery.min.js"></script>
<script type="text/javascript" src="../../statics/common/lib/vue.min.js"></script>
<script type="text/javascript" src="../../statics/plugins/ztree/jquery.ztree.all.min.js"></script>
<script type="text/javascript" src="../../statics/common/layui/layui.all.js"></script>
<script type="text/javascript" src="../../statics/common/js/axios.min.js"></script>
<script type="text/javascript" src="../../statics/common/js/xm-select.js"></script>
<script type="text/javascript" src="../../statics/js/common.js"></script>
<script type="text/javascript" src="../../statics/js/upload.js"></script>
<script type="text/javascript" src="../../statics/common/step/steps.js"></script>
<link rel="stylesheet" href="../../statics/css/jxcPublicAll.css"  media="all">
<link href="../../statics/common/photoviewer/dist/photoviewer.css" rel="stylesheet">
<link rel="stylesheet" href="../../statics/common/step/steps.css">
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.7/cropper.css" media="all">-->
<link rel="stylesheet" href="../../statics/js/modules/cropper/cropper.css" media="all">
<link rel="stylesheet" type="text/css" href="../../statics/css/viewer.min.css">
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.7/cropper.min.js"></script>-->
<script src="../../statics/js/modules/cropper/cropper.min.js"></script>
<script src="../../statics/common/photoviewer/dist/photoviewer.js"></script>
<script src="../../statics/common/layui/autocomplete.js"></script>
<script  src="../../statics/js/modules/viewer/viewer.min.js"></script>
<script src="../../statics/common/print-js/print.min.js"></script>
<link rel="stylesheet" type="text/css" href="../../statics/common/print-js/print.min.css">
<script type="text/javascript" src="../../statics/common/xmselect/xm-select.js"></script>
<script type="text/javascript" src="../../statics/js/searchview.js"></script>
<script type="text/javascript" src="../../statics/js/tableedit.js"></script>

<!--<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.0&type=webgl&ak=eo4XeZhRKHsQ0NOe6u6NkKscmRsk416B"></script>-->

<!-- 引入组件库 -->
<link rel="stylesheet" type="text/css" href="../../statics/css/index.css">






    <style>
        .layui-table-cell {
            padding: 0 5px;
            height: inherit;
            overflow: visible;
            text-overflow: inherit;
            white-space: normal;
            word-break: break-all;
        }
    </style>
</head>
<body class="ren-body">
<div id="rrapp" v-cloak>

    <div class="list-search-title-box">
        <form class="layui-form" style="box-shadow: 0 0 20px #eee;padding-right: 15px;">
            <section class="jxc-section" style="display: flex;align-items: flex-start;white-space: nowrap;">
                <div class="card layui-row" style="flex: 1">
                    <div class="layui-form-item ">
                        <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                            <label class="layui-form-label">优惠券名称:</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input searchVal" v-model="q.couponName"
                                       placeholder="请输入优惠券名称"/>
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                            <label class="layui-form-label">优惠券类型:</label>
                            <div class="layui-input-inline">
                                <select lay-filter="businessNo" v-model="q.businessNo">
                                    <option value="">请选择优惠券类型</option>
                                    <option value="1">经租</option>
                                    <option value="2">以租代购</option>
                                    <option value="3">金融分期</option>
                                    <option value="4">直购</option>
                                    <!--                                    <option value="5">短租</option>-->
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                            <label class="layui-form-label">状态:</label>
                            <div class="layui-input-inline">
                                <select lay-filter="couponStatus" v-model="q.couponStatus">
                                    <option value="">请选择优惠券状态</option>
                                    <option value="1">已上架</option>
                                    <option value="2">未上架</option>
                                    <option value="3">暂停</option>
                                    <option value="4">已下架</option>
                                    </option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                            <label class="layui-form-label">适用车系/车型:</label>
                            <div class="layui-input-inline">
                                <select lay-filter="serviceItemsNo" v-model="q.serviceItemsNo">
                                    <option value="">全部</option>
                                    <option v-for="r in serviceItems" :value="r.id" >{{r.value}}</option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                            <label class="layui-form-label">适用门店:</label>
                            <div class="layui-input-inline">
                                <select lay-filter="applicableUnitNo" v-model="q.applicableUnitNo">
                                    <option value="">全部</option>
                                    <option v-for="r in applicableUnits" :value="r.applicableUnitNo" >{{r.applicableUnit}}</option>
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                            <label class="layui-form-label">所属部门:</label>
                            <div class="layui-input-inline">
                                <select lay-filter="deptId" v-model="q.deptId">
                                    <option value="">全部</option>
                                    <option v-for="r in applicableUnits" :value="r.applicableUnitNo" >{{r.applicableUnit}}</option>
                                    </option>
                                </select>
                            </div>
                        </div>

                    </div>
                </div>
                <div style="display: flex;align-items: center;">
                    <!--查询重置按钮-->
                    <a class="layui-btn search-btn" @click="query">查询</a>
                    <a class="layui-btn reset-btn" @click="reset">重置</a>
                </div>
            </section>
        </form>
    </div>
    <div class="list-search-title-box">
        <form class="layui-form">
            <div style="display:flex;width: 100%;">
                <div class="layui-form-item layui-row" style="width: 100%;">
                    <div class="list-search-form-button" style="width: 100%;">
                        <!--除查询重置外其余按钮-->
                        <a class="layui-btn reset-btn" @click="add" v-m-perm="['coupon:couponInfo:add']">新增优惠券</a>

                        <a class="layui-btn reset-btn" @click="exports" v-m-perm="['coupon:couponInfo:export']">导出</a>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div class="list-table-content-box">
        <table class="layui-hide" id="grid" lay-filter="grid"></table>
    </div>
</div>

<!--操作-->
<script type="text/html" id="barTpl">
    <!--未上架 -->
    <a class="layui-grid-btn-xs" lay-event="view" more-btn-index="{{d.LAY_INDEX-1}}">详情</a>
<!--    <#if shiro.hasPermission("coupon:couponInfo:edit")>-->
    {{#if(d.couponStatus==2){}}
    <a class="layui-grid-btn-xs" lay-event="edit" v-m-perm="['coupon:couponInfo:edit']" more-btn-index="{{d.LAY_INDEX-1}}">编辑</a>
    {{# }}}
<!--    </#if>-->
<!--    <#if shiro.hasPermission("coupon:couponInfo:del")>-->
    {{#if(d.couponStatus==2){}}
    <a class="layui-grid-btn-xs" lay-event="del" v-m-perm="['coupon:couponInfo:del']" more-btn-index="{{d.LAY_INDEX-1}}">删除</a>
    {{# }}}
<!--    </#if>-->
<!--    <#if shiro.hasPermission("coupon:couponInfo:upDownCoupon")>-->
    {{#if(d.couponStatus==2){}}
    <a class="layui-grid-btn-xs" lay-event="shangJia" v-m-perm="['coupon:couponInfo:upDownCoupon']" more-btn-index="{{d.LAY_INDEX-1}}">上架</a>
    {{# }}}
<!--    </#if>-->

    <!--已上架 -->
<!--    <#if shiro.hasPermission("coupon:couponInfo:upDownCoupon")>-->
    {{#if(d.couponStatus==1){}}
    <a class="layui-grid-btn-xs" lay-event="zanTing" v-m-perm="['coupon:couponInfo:upDownCoupon']" more-btn-index="{{d.LAY_INDEX-1}}">暂停</a>
    {{# }}}
<!--    </#if>-->
<!--    <a class="layui-grid-btn-xs" lay-event="share">分享</a>-->
<!--    <#if shiro.hasPermission("coupon:couponInfo:sendUser")>-->
    {{#if(d.couponStatus==1){}}
    <a class="layui-grid-btn-xs" lay-event="sendCustomer" v-m-perm="['coupon:couponInfo:sendUser']" more-btn-index="{{d.LAY_INDEX-1}}">发送指定用户</a>
    {{# }}}
<!--    </#if>-->

<!--    <#if shiro.hasPermission("coupon:couponInfo:activityData")>-->
    {{#if(d.couponStatus==1 || d.couponStatus==4 ||d.couponStatus==3) {}}
    <a class="layui-grid-btn-xs" lay-event="couponData" v-m-perm="['coupon:couponInfo:activityData']" more-btn-index="{{d.LAY_INDEX-1}}">活动数据</a>
    {{# }}}
<!--    </#if>-->
<!--    <#if shiro.hasPermission("coupon:couponInfo:upDownCoupon")>-->
    {{#if(d.couponStatus==3){}}
    <a class="layui-grid-btn-xs" lay-event="qiYong" v-m-perm="['coupon:couponInfo:upDownCoupon']" more-btn-index="{{d.LAY_INDEX-1}}">启用</a>
    <a class="layui-grid-btn-xs" lay-event="xiaJia" v-m-perm="['coupon:couponInfo:upDownCoupon']" more-btn-index="{{d.LAY_INDEX-1}}">下架</a>
    {{# }}}
<!--    </#if>-->

</script>

<script src="../../statics/js/modules/coupon/couponList.js?_${.now?long}"></script>
</body>
</html>
